package com.fushenlan.epidemicControl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fushenlan.po.NeighborhoodMember;
import com.fushenlan.po.NeighborhoodMemberDO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * @Author XUJIN
 * @DATE 2022/4/21
 * @PACKAGE_NAME com.fushenlan.epidemicControl.mapper
 * @VERSION 1.0
 */
public interface NeighborhoodMemberMapper extends BaseMapper<NeighborhoodMember> {

    List<NeighborhoodMember> findNeighborMemberList(NeighborhoodMember neighborhoodMember);

    Map<String, Object> findUser(@Param("account") String account);

    @Select({"select * from neighborhood_member where id=#{id}"})
    NeighborhoodMemberDO findUserById(@Param("id") Long id);

    @Update({"update neighborhood_member set password = #{password}, updateDate = #{updateDate} where id = #{id}"})
    void updateUser(@Param("password") String password, @Param("id") Long id, @Param("updateDate") String updateDate);
}
